package com.pine.dcts.common;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;


@Data
public class Pagination  implements IQueryObject{


    private Integer pageSize;

    private Integer pageIndex;


    public <T> Page getPage() {
        Integer pageSize = this.pageSize != null ? this.pageSize : 10;
        Integer pageNumber = this.pageIndex != null ? this.pageIndex : 1;
        Page<T> page = new Page(pageNumber, pageSize);
        return page;
    }
}
